package controller.res;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import common.interf.IErrorHandle;

import service.interf.IResource;

@Controller
@RequestMapping("/res")
public class ResourceTypeFindController {

	@Autowired
	private IResource res;
	@Autowired
	private IErrorHandle errorHandle;
	
	@RequestMapping("/find_all_types.htm")
	@ResponseBody
	public String findAll(){
		String x;
		try{
			x = res.findAllType();
		} catch (Exception e){
			x = errorHandle.handleErr(e);
		}
		return x;
	}  
	
	
}
